package com.task;

import com.service.SettleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author: chihaojie
 * @Date: 2019/8/3 17:26
 * @Version 1.0
 * @Note
 */
@Component
public class SettlementTask {



    @Autowired
    private SettleService  settleService;


   //每月一号0 0 0 1 * ?
    @Scheduled(cron = "0 0 0 1 * ?")// ： 表示 每月一号
    public void handleLastMonthSettleEveryMonthFirtDay() {
        System.out.println("===========每月一号定时任务处理未结算单==================");
        //settleService.
    }

    //0 0 0 1W * ?
    //@Scheduled(cron = "0 0 0 1W * ?")// ： 每月第一个工作日
    public void handleLastMonthSettleEveryMonthWorkDay() {
        System.out.println("===========每月第一个工作日定时任务处理未结算单==================");
    }
}
